<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../lib/metro.css" rel="stylesheet">

    <title>Test Checkbox - Metro UI :: Popular HTML, CSS and JS library</title>
    <style>
        body {
            padding-top: 50px;
        }
    </style>
</head>
<body class="m4-cloak">
<nav data-role="appbar">
    <span class="app-bar-item">Checkbox</span>
    <div class="app-bar-item no-hover">
        <input type="checkbox" data-role="theme-switcher" data-state="light"/>
    </div>
</nav>

<div class="container">
    <h1>Checkbox test page</h1>

    <div class="mt-4">
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox">
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" checked>
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" disabled>
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" disabled checked>
    </div>

    <div class="mt-4" style="--checkbox-color: red; --checkbox-background: transaprent;">
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox">
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" checked>
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" disabled>
        <input type="checkbox" data-role="checkbox" data-caption="Checkbox" disabled checked>
    </div>

    <div class="mt-4">
        <div>
            <button class="button" onclick="Metro.getPlugin('#chk1', 'checkbox').toggle(-1)">Indeterminate</button>
            <button class="button" onclick="Metro.getPlugin('#chk1', 'checkbox').toggle(1)">Checked</button>
            <button class="button" onclick="Metro.getPlugin('#chk1', 'checkbox').toggle(0)">UnChecked</button>
            <button class="button" onclick="Metro.getPlugin('#chk1', 'checkbox').toggle()">Toggle</button>
        </div>
        <br>
        <div>
            <input type="checkbox" data-role="checkbox" id="chk1" data-caption="Remote controlled">
        </div>
    </div>

    <h3>Three state</h3>
    <div>
        <input type="checkbox" data-role="checkbox" data-three-state="true" data-append="Checkbox1">
        <input type="checkbox" data-role="checkbox" data-three-state="true" data-append="Checkbox2" checked>
    </div>
    <div>
        <input type="checkbox" data-role="checkbox-three-state" data-caption="Checked" data-state="checked">
        <input type="checkbox" data-role="checkbox-three-state" data-caption="Unchecked" data-state="unchecked">
        <input type="checkbox" data-role="checkbox-three-state" data-caption="Indeterminate" data-state="indeterminate">
    </div>
    <br>
    <div>
        <button class="button" onclick="Metro.getPlugin('#chk2', 'checkbox-three-state').uncheck()">Uncheck</button>
        <button class="button" onclick="Metro.getPlugin('#chk2', 'checkbox-three-state').check()">Check</button>
        <button class="button" onclick="Metro.getPlugin('#chk2', 'checkbox-three-state').indeterminate()">Indeterminate</button>
        <button class="button" onclick="Metro.getPlugin('#chk2', 'checkbox-three-state').toggle()">Toggle</button>
        <button class="button" onclick="alert(Metro.getPlugin('#chk2', 'checkbox-three-state').getCheckState(true))">Get state</button>
    </div>
    <div>
        <input type="checkbox" data-role="checkbox-three-state" data-caption="Checked" id="chk2">
    </div>

</div>

<script src="../lib/metro.js"></script>
<script>
</script>
</body>
</html>
